from fastapi import APIRouter

from api.captcha_ import generate_captcha
from api.message import receive_message
from api.switch_language import switch_language

router = APIRouter(prefix="/api", tags=["api"])


def api_router():
    router.add_api_route(path="/switch_language/{language}", endpoint=switch_language, methods=["GET"], name="switch_language")
    router.add_api_route(path="/generate_captcha", endpoint=generate_captcha, methods=["POST"], name="generate_captcha")
    router.add_api_route(path="/receive_message", endpoint=receive_message, methods=["POST"], name="receive_message")

    return router
